package com.ztf;

import java.util.Random;

import org.w3c.dom.DOMException;

public class Test01 {
	
	public static void main(String[] args) {
		
		long maxMemory = Runtime.getRuntime().maxMemory();//返回jvm试图使用的最大内存
		long totalMemory = Runtime.getRuntime().totalMemory();//返回jvm中的内存总量
	    System.out.println("maxMemory="+maxMemory+"(字节)、"+(maxMemory/(double)1024/1024+"MB"));
	    System.out.println("totalMemory="+totalMemory+"(字节)、"+(totalMemory/(double)1024/1024+"MB"));
	   /*
	    String kk="nidayede!";
	    while (true) {
			kk+=kk+new Random().nextInt(6666666)+new Random().nextInt(888888888);
		}*/
		
	}
	
	

}
